var buildingIdCurrent;
var buildingAdress;
layui.use(['jquery','layer','laytpl'], function() {	
	$ = layui.jquery;
	var layer = layui.layer;
	var _urlPath="../";
	 
		$.getJSON(_urlPath+"admin/netmap/buildingUsers?buildingId="+parent.clickValue)
        .done(function (json) {
        	
   	     var app = new Vue({
   		  el:'#cg-community-box',
   		  data:json,
   		  methods:{
   			  hasPerson:function(key){
   				 return this.userInfos.hasOwnProperty(key);
   			  }
   		  }
   	    });
   	     
   	  $(".household-box td").click(function () {
 		 buildingIdCurrent = parent.clickValue;
 		
//      	if(!$(this).hasClass("yiluru")){,
//      	//	alert("没有登记住户！");
//      		return;
//      	}

      	 var title = $(this).html();
      	 buildingAdress =title ;
      	 //未录入
     	if($(this).css("backgroundColor")== "rgb(181, 181, 183)"){
     		
     	}
     	else{
     		var height = $("body").height()*0.6;
          	var width = $("body").width()*0.8;
              layer.open({
                  type: 2,
                  title: '您选择的是：'+title,
                  shadeClose: true,
                  shade: 0.5,
                  closeBtn: 1,
                  area: [width+'px',height+'px'],
                  content: _urlPath+"page/netmap_floor_detail.html"
              });
     	}
      	 
        });
   });
});

